import { ClassSerializerInterceptor, ValidationPipe } from "@nestjs/common";
import { NestFactory } from "@nestjs/core";
import { AppRootModule } from "./app.module";

async function bootstrap() {
  const app = await NestFactory.create(AppRootModule, {
    logger: true,
  });

  app.useGlobalPipes(new ValidationPipe());
  app.enableCors();
  app.setGlobalPrefix("/api/v1");
  const port = process.env.PORT || 7002;
  await app.listen(port);
}
bootstrap();
